﻿CREATE PROCEDURE [dbo].[responses_get_by_book]
    @bookId int = 0
AS
SELECT 
    Responses.Content,
    Responses.[DateOfPublish],
    Users.[Login],
    Users.Avatar
FROM Responses
    INNER JOIN Users on Responses.UserId = Users.UserId
WHERE Responses.BookId = @bookId
ORDER BY Responses.DateOfPublish DESC
RETURN 0
